home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / Open Me for REALbasic 3 / REALbasic 3.2 / Example Projects / Reusable Classes_Code / User Interface / AlphaButtons 2.0 / About alphaButtons 2.0 next >
Text File  |  2000-01-01  |  2KB  |  59 lines

  1. alphaButtons 2.0  January 2, 2000
  2. alphaButtons 2.0 is copyright © 2000 Michael Rosander.
  3. You are welcome to use alphaButtons in your applications providing you give credit to me in the about box or in the documentation of your application.
  4.  
  5. michael.rosander@home.se
  6. http://www.liu.se/ipp/rb
  7.  
  8.  
  9. What's the difference between version 1.0 and 2.0?
  10. Almost all code is new. Version 2.0 is a lot more dynamic compared to 1.0 where you just could have the buttons one way and with a fixed set of buttons. In 2.0 you can change:
  11. the button caption, the number of buttons, the button size, the space between buttons, the number of "columns", and so on... 
  12.  
  13. NEW EVENTS
  14. Open() - set the properties, if left empty the default values are used (see below)
  15. Action(index as integer) - fires when a button is clicked on 
  16.                                        - index is the number of the current button (1-based)
  17.  
  18. PROPERTIES
  19. buttonCaption as string 
  20.    //default this is "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"
  21.    - the text that will be displayed on the buttons (also sets the number of buttons)
  22. buttonWidth as integer 
  23.    //default 16
  24. buttonHeight as integer 
  25.    //default 16
  26. buttonSpacing as integer 
  27.    //default 1 (i.e. the space between buttons)
  28. buttonColumns as integer 
  29.    //default 7 (number of columns...)
  30. buttonTextFont as string 
  31.    //default "system"
  32. buttonTextSize as integer 
  33.    //default 9
  34. buttonTextBold as boolean 
  35.    //default false (to make the caption bold...)
  36.  
  37. largeButtonCentered as boolean 
  38.    //default false (centers the large button...)
  39. largeButtonText as string 
  40.    //default "Show all" (the caption of the large button)
  41. largeButtonWidth as integer 
  42.    //default 118 (if set larger than the total column width set equal to it)
  43.  
  44. horizontalOnly as boolean 
  45.    //default false (an easy way to get one row of buttons - no need to set buttonColumns)
  46.  
  47. notEnabled(index) as boolean 
  48.    //disable a button* ( + update() )
  49. selected as integer 
  50.    //the selected button*  (can also be set in code + update() )
  51. *The buttons are 1-based
  52.  
  53. METHODS
  54. init() - is called automatically on open, but if changes to height,width or caption is made it must be called again followed by update()
  55. update() - if changes are made, but not to height,width or caption, just update() is enough...
  56. getCaption(index as integer) as string - to get the caption for any of the buttons (not the large button) e.g. theSelectedButtonCaption = me.getCaption(me.selected)
  57.  
  58.  
  59.